package com.cloud.wms.http;

import java.util.List;

/**
 * @Author:Chen
 * @Date: 2021-01-19 15:54
 * @Description:
 */
public class ErrorEntity {

    /**
     * error : {"code":null,"message":"Your request is not valid!","details":"The following errors were detected during validation.\r\n - The ExecutorID field is required.\r\n","data":{},"validationErrors":[{"message":"The ExecutorID field is required.","members":["executorID"]}]}
     */

    private ErrorBean error;

    public String getErrorMsg() {
        if (error != null)
            return error.getMessage();
        return "服务器未知错误，请联系管理员!";
    }

    public ErrorBean getError() {
        return error;
    }

    public void setError(ErrorBean error) {
        this.error = error;
    }

    public static class ErrorBean {

        /**
         * code : null
         * message : Your request is not valid!
         * details : The following errors were detected during validation.
         * - The ExecutorID field is required.
         * data : {}
         * validationErrors : [{"message":"The ExecutorID field is required.","members":["executorID"]}]
         */

        private String code;
        private String message;
        private String details;
        private Object data;
        private Object validationErrors;

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getMessage() {
            return message;
        }

        public void setMessage(String message) {
            this.message = message;
        }

        public String getDetails() {
            return details;
        }

        public void setDetails(String details) {
            this.details = details;
        }

        public Object getData() {
            return data;
        }

        public void setData(Object data) {
            this.data = data;
        }

        public Object getValidationErrors() {
            return validationErrors;
        }

        public void setValidationErrors(Object validationErrors) {
            this.validationErrors = validationErrors;
        }
    }
}
